(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
list(Cons(x, xs)) → list(xs)
list(Nil) → True
list(Nil) → isEmpty[Match](Nil)
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(x) → list(x)
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
list(Cons(x, xs)) → list(xs)
list(Nil) → True
list(Nil) → isEmpty[Match](Nil)
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(x) → list(x)
S is empty.
Rewrite Strategy: INNERMOST
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
Cons/0
isEmpty[Match]/0
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
list(Cons(xs)) → list(xs)
list(Nil) → True
list(Nil) → isEmpty[Match]
notEmpty(Cons(xs)) → True
notEmpty(Nil) → False
goal(x) → list(x)
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
list(Cons(xs)) → list(xs)
list(Nil) → True
list(Nil) → isEmpty[Match]
notEmpty(Cons(xs)) → True
notEmpty(Nil) → False
goal(x) → list(x)
Types:
list :: Cons:Nil → True:isEmpty[Match]:False
Cons :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
True :: True:isEmpty[Match]:False
isEmpty[Match] :: True:isEmpty[Match]:False
notEmpty :: Cons:Nil → True:isEmpty[Match]:False
False :: True:isEmpty[Match]:False
goal :: Cons:Nil → True:isEmpty[Match]:False
hole_True:isEmpty[Match]:False1_0 :: True:isEmpty[Match]:False
hole_Cons:Nil2_0 :: Cons:Nil
gen_Cons:Nil3_0 :: Nat → Cons:Nil
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
list
(8) Obligation:
Innermost TRS:
Rules:
list(
Cons(
xs)) →
list(
xs)
list(
Nil) →
Truelist(
Nil) →
isEmpty[Match]notEmpty(
Cons(
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
x) →
list(
x)
Types:
list :: Cons:Nil → True:isEmpty[Match]:False
Cons :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
True :: True:isEmpty[Match]:False
isEmpty[Match] :: True:isEmpty[Match]:False
notEmpty :: Cons:Nil → True:isEmpty[Match]:False
False :: True:isEmpty[Match]:False
goal :: Cons:Nil → True:isEmpty[Match]:False
hole_True:isEmpty[Match]:False1_0 :: True:isEmpty[Match]:False
hole_Cons:Nil2_0 :: Cons:Nil
gen_Cons:Nil3_0 :: Nat → Cons:Nil
Generator Equations:
gen_Cons:Nil3_0(0) ⇔ Nil
gen_Cons:Nil3_0(+(x, 1)) ⇔ Cons(gen_Cons:Nil3_0(x))
The following defined symbols remain to be analysed:
list
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
list(
gen_Cons:Nil3_0(
n5_0)) →
True, rt ∈ Ω(1 + n5
0)
Induction Base:
list(gen_Cons:Nil3_0(0)) →RΩ(1)
True
Induction Step:
list(gen_Cons:Nil3_0(+(n5_0, 1))) →RΩ(1)
list(gen_Cons:Nil3_0(n5_0)) →IH
True
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
list(
Cons(
xs)) →
list(
xs)
list(
Nil) →
Truelist(
Nil) →
isEmpty[Match]notEmpty(
Cons(
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
x) →
list(
x)
Types:
list :: Cons:Nil → True:isEmpty[Match]:False
Cons :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
True :: True:isEmpty[Match]:False
isEmpty[Match] :: True:isEmpty[Match]:False
notEmpty :: Cons:Nil → True:isEmpty[Match]:False
False :: True:isEmpty[Match]:False
goal :: Cons:Nil → True:isEmpty[Match]:False
hole_True:isEmpty[Match]:False1_0 :: True:isEmpty[Match]:False
hole_Cons:Nil2_0 :: Cons:Nil
gen_Cons:Nil3_0 :: Nat → Cons:Nil
Lemmas:
list(gen_Cons:Nil3_0(n5_0)) → True, rt ∈ Ω(1 + n50)
Generator Equations:
gen_Cons:Nil3_0(0) ⇔ Nil
gen_Cons:Nil3_0(+(x, 1)) ⇔ Cons(gen_Cons:Nil3_0(x))
No more defined symbols left to analyse.
(12) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
list(gen_Cons:Nil3_0(n5_0)) → True, rt ∈ Ω(1 + n50)
(13) BOUNDS(n^1, INF)
(14) Obligation:
Innermost TRS:
Rules:
list(
Cons(
xs)) →
list(
xs)
list(
Nil) →
Truelist(
Nil) →
isEmpty[Match]notEmpty(
Cons(
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
x) →
list(
x)
Types:
list :: Cons:Nil → True:isEmpty[Match]:False
Cons :: Cons:Nil → Cons:Nil
Nil :: Cons:Nil
True :: True:isEmpty[Match]:False
isEmpty[Match] :: True:isEmpty[Match]:False
notEmpty :: Cons:Nil → True:isEmpty[Match]:False
False :: True:isEmpty[Match]:False
goal :: Cons:Nil → True:isEmpty[Match]:False
hole_True:isEmpty[Match]:False1_0 :: True:isEmpty[Match]:False
hole_Cons:Nil2_0 :: Cons:Nil
gen_Cons:Nil3_0 :: Nat → Cons:Nil
Lemmas:
list(gen_Cons:Nil3_0(n5_0)) → True, rt ∈ Ω(1 + n50)
Generator Equations:
gen_Cons:Nil3_0(0) ⇔ Nil
gen_Cons:Nil3_0(+(x, 1)) ⇔ Cons(gen_Cons:Nil3_0(x))
No more defined symbols left to analyse.
(15) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
list(gen_Cons:Nil3_0(n5_0)) → True, rt ∈ Ω(1 + n50)
(16) BOUNDS(n^1, INF)